package com.haltakov.letterjumble.game.api;

import java.awt.Image;


/**
 * 
 * @author Vladimir Haltakov, Elitsa Haltakova
 * 
 *
 */
public class Letter {
	public static Letter START_LETTER = new Letter('*', 0, 0);
	
	char letter;
	Image image = null;
	int points, count;
	
	public Letter(char letter, int count, int points) {
		this.letter = letter;
		this.points = points;
		this.count = count;
	}
	
	public Character getCharacter() {
		return letter;
	}
	
	public Image getImage() {
		return image;
	}
	
	public int getPoints() {
		return points;
	}
	
	public int getCount() {
		return count;
	}
	
	@Override
	public String toString() {
		return letter + " (" + count + "," + points + ")";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + letter;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Letter other = (Letter) obj;
		if (letter != other.letter)
			return false;
		return true;
	}
	
	
}
